<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a >列表</a></li>
		</ul>
		<form class="well form-inline margin-top-20" method="post" name="form1" >
			收支类型：
            <select class="form-control" name="type">
				<option value="">全部</option>
                <volist name="type" id="v">
                    <option value="{$key}" <if condition="input('request.type') neq '' && input('request.type') eq $key">selected</if>>{$v}</option>
                </volist>
			</select>
			收支行为： 
            <select class="form-control" name="action">
				<option value="">全部</option>
                <volist name="action" id="v">
                    <option value="{$key}" <if condition="input('request.action') neq '' && input('request.action') eq $key">selected</if>>{$v}</option>
                </volist>
			</select>
			时间：
			<input class="form-control js-bootstrap-date" name="start_time" id="start_time" value="{:input('request.start_time')}" aria-invalid="false" style="width: 110px;"> - 
            <input class="form-control js-bootstrap-date" name="end_time" id="end_time" value="{:input('request.end_time')}" aria-invalid="false" style="width: 110px;">
			会员： 
            <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
                   placeholder="请输入会员ID">
			主播： 
            <input class="form-control" type="text" name="touid" style="width: 200px;" value="{:input('request.touid')}"
                   placeholder="请输入主播ID">
			订单ID：
            <input class="form-control" type="text" name="orderid" style="width: 200px;" value="{:input('request.orderid')}" placeholder="订单ID">
			<input type="submit" class="btn btn-primary" value="搜索" onclick="form1.action='{:url('Orderrecord/index')}';form1.submit();">
			<input type="button" class="btn btn-success" value="导出" onclick="form1.action='{:url('Orderrecord/export')}';form1.submit();"/>
			<div style="margin-top:10px">
				总收益：{$moneysum|default=0}  (根据筛选条件统计)
			</div>													 
		</form>		
		
		<form method="post" class="js-ajax-form">
	
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th>ID</th>
						<th>收支类型</th>
						<th>收支行为</th>
						<th>下单方昵称 (ID)</th>
						<th>接单方昵称 (ID)</th>
						<th>订单ID</th>
						<th>服务时间</th>
						<th>结束时间</th>
						<th>数量</th>
						<th>总价</th>
						<th>时间</th>
						<!-- <th>{:lang('ACTIONS')}</th> -->
					</tr>
				</thead>
				<tbody>
					
					<foreach name="lists" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$type[$vo['type']]}</td>
						<td>{$action[$vo['action']]}</td>
						<td>{$vo['userinfo']['user_nickname']} ({$vo['uid']})</td>
						<td>{$vo['touserinfo']['user_nickname']} ({$vo['touid']})</td>
						<td>{$vo['actionid']}</td>
						<td>
						<if condition="$vo['orderinfo']['svctm'] eq '0'" >
						    未处理
						 <else/>
						     {:date('Y-m-d H:i:s',$vo['orderinfo']['svctm'])}
						 </if>	
						 </td>
						<td>
						<if condition="$vo['orderinfo']['svctm'] eq '0'" >
						    未处理
						 <else/>
						     {:date('Y-m-d H:i:s',$vo['orderinfo']['overtime'])}
						 </if>	</td>
						<td>{$vo['nums']}</td>
						<td>{$vo['total']}</td>
						<td>{:date('Y-m-d H:i:s',$vo['addtime'])}</td>
						<!-- <td>	 -->
							<!-- <a class="btn btn-xs btn-primary" href='{:url("Coinrecord/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
							<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Coinrecord/del',array('id'=>$vo['id']))}">{:lang('DELETE')}</a> -->
						<!-- </td> -->
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>

		</form>
	</div>
    <script src="__STATIC__/js/admin.js"></script>
</body>
</html>